<form class="layui-form seller-form" action="">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li><a href="{:url('tranForceButton')}">卡强制消费详情</a></li>
            <li><a href="{:url('tranForceTotal')}">卡强制消费统计(实时)</a></li>
            <li><a href="{:url('tranForceKey')}">预扣>0,实际=0</a></li>
            <li class="layui-this"><a href="{:url('tranForceDec')}">AMZ*Amazon Payments拒付统计</a></li>
        </ul>
    </div>
</form>
<div class="table-body">
    <table id="balanceTable" lay-filter="balanceTable"></table>
</div>
<script>
    layui.use(['form', 'laydate', 'table',], function () {
        var laydate = layui.laydate,
            form = layui.form,
            table = layui.table; //表格
        //时间插件
        laydate.render({
            elem: '#datetime',
            range: '_',
            format: 'yyyy-MM-dd'
        });
        var tableIn = table.render({
            elem: '#balanceTable',
            height: 'full-99',
            cellMinWidth: '80',
            totalRow: true,
            method: 'post',
            url: "{:url('Cards/tranForceDec')}",
            id: 'balanceTable',
            //where:{tran_token : $('#tran_token').val()},
            toolbar: '#toolbar', //开启头部工具栏，并为其绑定左侧模板
            defaultToolbar: ['filter', 'exports'],
            cols: [[
                { type: 'numbers'},
                { field: 'username',  align: 'left', title: '用户',width: 180},
                { field: 'balance',  align: 'right', title: '用户余额($)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
                { field: 'fund_amount',  align: 'right', title: '总充值金额($)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
                { field: 'amount_auth',  align: 'right', title: '拒付总金额($)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
                { field: 'card_balance',  align: 'right', title: '卡总余额($)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
                { field: 'is_use', title: '使用过559666', width:150 ,
                    templet:function (d) {
                        const is_use  =   d.is_use;
                        var   html          =   '';
                        if(is_use == 1){
                            html = "<span style='color: green'>使用过</span>";
                        }else{
                            html = "<span style='color: #8c8c8c'>未使用</span>";
                        }
                        return html;
                    }
                },
                { field: 'num', align: 'left', title: '拒付总笔数',width: 180},
            ]],
            page: true,
            limit: 1000,
            limits: [1000],
        });
    });
</script>